import axios from "@/request/request";
import qs from 'qs'
//精品推荐
export const JingpinAPI=()=>axios.get('/products/recommend')

//热门推荐
export const RemenAPI=()=>axios.get('/products/hot')
//发送短信验证码
export const SendSMSAPI=(params)=>axios.post("/sendSMS",qs.stringify(params))
//登录请求
export const PhoneReginAPI = (params) => axios.post("/phoneRegin", qs.stringify(params));

//微信扫码登录
export const WeiXinLoginAPI = (params) => axios.post("/wechatUsers/PCLogin", qs.stringify(params));

//手机号关联微信登录
export const BinddingAPI = (params) => axios.post("/wechatUsers/binding", qs.stringify(params));

//获取用户信息 
export const UserProfilesAPI = () => axios.get("/shop/userProfiles");

//请求产品详情信息
export const GoodsDetailsAPI = (params) => axios.get(`/products/${params}`);
//加入购物车
export const AddToCartAPI = (params) => axios.post("shop/carts/add", qs.stringify(params));
//商品搜索 获取所有产品
export const GoodsSearchAPI = (params) => axios.get("products",{params});

// 请求购物车数据
export const CartDataApI = () => request.get(`/shop/carts`);